import Mock from "mockjs"
import bananer from "./banner.json"
import floor from './floor.json'
import address from '@/mock/address'
//使用Mock拦截ajax请求 书写接口和响应
//Mock里面有个mock方法，有三个参数
//第一个参数 是请求地址，第二个参数是请求方式（可以忽略）第三个参数是配置对象

Mock.mock("/mock-api/banner","get",()=>{
    return {
        code:200,
        data:bananer
    }
})

Mock.mock("/mock-api/floor","get",()=>{
    return {
        code:200,
        data:floor
    }
})
Mock.mock("/mock-api/address", "get", () => {
    return {
      code: 200,
      data: address,
    };
  });

